package com.example.exam.service;

import com.example.exam.entity.ExamPaperAnswer;
import com.example.exam.vo.InfoVO;
import com.example.exam.vo.QuestionAnalysisVO;

import java.util.List;

/**
 * @author shishuqian
 * date 2021/4/28
 * time 14:27
 **/
public interface QuestionAnswerService {

    //批量保存用户填写的问题答案
//    void saveAll(List<QuestionAnswer> questionAnswers);

    //根据问题id查询所有用户填写的答案
    List<String> queryAllAnswerByQuestionId(Integer question_id);

    //统计某选项被选次数
    int countChoice(Integer question_id,String user_answer);

    //统计好选择题(choice)和判断题(judge)数据后返回，根据试卷id
    List<QuestionAnalysisVO> countQuestionResult(Integer examPaper_id);

    //根据试卷id统计已填写的人数
    int countFilledPeople(Integer examPaper_id);

    List<InfoVO> queryAllAnswer(Integer questionId);

    //查看填写改试卷的所有人排名
    List<ExamPaperAnswer> viewRanking(Integer examPaperId);
}
